﻿using Architecture.Domain.RBAC;
using Architecture.Repository;
using Architecture.Repository.Migrations;
using Architecture.Service.Interface;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Architecture.Service.Impl
{
    public class UserRepository : BaseRepository<UserInfo>, IUserRepository
    {
        /// <summary>
        /// 构造函数
        /// </summary>
        /// <param name="context"></param>
        public UserRepository(EFCoreContext context) : base(context)
        {
        }
        /// <summary>
        /// 添加
        /// </summary>
        /// <param name="entity"></param>
        /// <returns></returns>
        public async Task<int> AddAsync(UserInfo entity)
        {
            return await base.AddAsync(entity);
        }
        /// <summary>
        /// 修改
        /// </summary>
        /// <param name="entity"></param>
        /// <returns></returns>
        public async Task<int> UpdateAsync(UserInfo entity)
        {
            return await base.UpdateAsync(entity);
        }
        /// <summary>
        /// 显示查询
        /// </summary>
        /// <returns></returns>
        public async Task<List<UserInfo>> GetAllAsync()
        {
            return await base.GetAllAsync();
        }
        /// <summary>
        /// 反填
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        public async Task<UserInfo> GetAsync(int id)
        {
            return await base.GetAsync(id);
        }

    }
}
